package com.linc.facerecognitionsi.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;

import com.linc.facerecognitionsi.R;
import com.linc.facerecognitionsi.metadata.Constants;

public class OutDialog extends Activity{
    private static final String TAG = "OutDialog";
	private Button cancelBtn,okayBtn;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.dialog_out);
        cancelBtn = (Button) findViewById(R.id.btn_cancel);
        okayBtn = (Button) findViewById(R.id.btn_ok);
		cancelBtn.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
                OutDialog.this.finish();
			}
		});

		okayBtn.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
                Intent intent = new Intent();
                intent.putExtra(Constants.RESULT,Constants.RESULT_OK);
                OutDialog.this.setResult(RESULT_OK, intent);
				OutDialog.this.finish();
			}
		});
	}
}
